import { apiSelectRule } from '@/components/FormCreate/src/config/selectRule'
import request from '@/config/axios'

/** 财务API */
export const FinanceApi = {
  // 领料分页查询
  getreceiveOrderPage: async (params: any) => {
    return await request.get({ url: `/erp/excel/receiveOrderPage`, params })
  },
  // 生产入库分页查询
  getproduceStockInPage: async (params: any) => {
    return await request.get({ url: `/erp/excel/produceStockInPage`, params })
  },
  // 采购入库分页查询
  baseStockInPage: async (params: any) => {
    return await request.get({ url: `/erp/excel/baseStockInPage`, params })
  },
  // 仓库调拨单分页查询
  stockMovePage: async (params: any) => {
    return await request.get({ url: `/erp/excel/stockMovePage`, params })
  },
  // 仓库调拨单汇总分页查询
  stockMoveSumPage: async (params: any) => {
    return await request.get({ url: `/erp/excel/stockMoveSumPage`, params })
  },

  // 领料单导出 Excel
  exportReceiveOrderExcel: async (params) => {
    return await request.download({ url: `/erp/excel/exportReceiveOrderExcel`, params })
  },
  // 外购入库单-生产入库数据导出 Excel
  exportProduceStockInExcel: async (params) => {
    return await request.download({ url: `/erp/excel/exportProduceStockInExcel`, params })
  },
  // 外购入库单-采购入库数据导出 Excel
  exportBaseStockInExcel: async (params) => {
    return await request.download({ url: `/erp/excel/exportBaseStockInExcel`, params })
  },
  // 仓库调拨单导出 Excel
  exportStockMoveExcel: async (params) => {
    return await request.download({ url: `/erp/excel/exportStockMoveExcel`, params })
  },
  // 仓库调拨单汇总导出 Excel
  exportStockMoveSumExcel: async (params) => {
    return await request.download({ url: `/erp/excel/exportStockMoveSumExcel`, params })
  },
  // 外购入库单 生产入库 汇总
  produceStockInSum: async (params) => {
    return await request.get({ url: `/erp/excel/produceStockInSumPage`, params })
  },
  // 外购入库单 生产入库 汇总 导出
  exportProduceStockInSumExcel: async (params) => {
    return await request.download({ url: `/erp/excel/exportProduceStockInSumExcel`, params })
  },
  // 外购入库单 采购入库 汇总
  baseStockInSum: async (params) => {
    return await request.get({ url: `/erp/excel/baseStockInSumPage`, params })
  },
  // 外购入库单 采购入库 汇总 导出
  exportBaseStockInSumExcel: async (params) => {
    return await request.download({ url: `/erp/excel/exportBaseStockInSumExcel`, params })
  }
}
